<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>clusters &#8212; Cluster Interface &mdash; Interop Router 3.30 documentation</title>
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../../',
          VERSION:     '0',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="top" title="Interop Router 3.30 documentation" href="../../index.html" />
    <link rel="up" title="Python Modules" href="mod_index.html" />
    <link rel="next" title="connectSQL &#8212; SQL Connection Handler" href="connectSQL.html" />
    <link rel="prev" title="deemon &#8212; Daemon Main" href="deemon.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="connectSQL.html" title="connectSQL &#8212; SQL Connection Handler"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="deemon.html" title="deemon &#8212; Daemon Main"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">Interop Router 3.30 documentation</a> &raquo;</li>
          <li><a href="../index.html" accesskey="U">Deemon Documentation</a> &raquo;</li>
          <li><a href="mod_index.html" accesskey="U">Python Modules</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  
  <div class="section" id="module-clusters">
<h1><tt class="xref docutils literal"><span class="pre">clusters</span></tt> &#8212; Cluster Interface<a class="headerlink" href="#module-clusters" title="Permalink to this headline">¶</a></h1>
<p>This is the operating system interfaces of Daemon.</p>
<p>It communicates with Cluster&#8217;s Utilites, compiling the source code,
send the job to cluster and retrieve the job&#8217;s results.</p>
<p>For each Cluster a class that implements the specific 
communication between Daemon and the Cluster must exist.</p>
<dl class="class">
<dt id="clusters.Linux">
<!--[clusters.Linux]-->class <tt class="descname">Linux</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#clusters.Linux" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a title="clusters.SysOp" class="reference internal" href="#clusters.SysOp"><tt class="xref docutils literal"><span class="pre">clusters.SysOp</span></tt></a></p>
<p>Implements interface class with Linux systems.</p>
<p>Warning: Not tested! (Infrastructure problems)</p>
<p>Extends the SysOp.__init__ method, adding one more config parameter.</p>
<blockquote>
In Linux it is necessary a password to submit jobs.</blockquote>
<dl class="method">
<dt id="clusters.Linux.compileProject">
<!--[clusters.Linux.compileProject]--><tt class="descname">compileProject</tt><big>(</big><em>project</em><big>)</big><a class="headerlink" href="#clusters.Linux.compileProject" title="Permalink to this definition">¶</a></dt>
<dd><p>Method for compile the project&#8217;s source code in Linux.</p>
<p>If a compilation error occours, a ErroCompilacao Exception is raised</p>
</dd></dl>

<dl class="method">
<dt id="clusters.Linux.jobIsComplete">
<!--[clusters.Linux.jobIsComplete]--><tt class="descname">jobIsComplete</tt><big>(</big><em>job</em><big>)</big><a class="headerlink" href="#clusters.Linux.jobIsComplete" title="Permalink to this definition">¶</a></dt>
<dd>Linux implementation of method that verify if the job has finished.</dd></dl>

<dl class="method">
<dt id="clusters.Linux.sumbitJob">
<!--[clusters.Linux.sumbitJob]--><tt class="descname">sumbitJob</tt><big>(</big><em>project</em>, <em>job</em><big>)</big><a class="headerlink" href="#clusters.Linux.sumbitJob" title="Permalink to this definition">¶</a></dt>
<dd>Linux version of method for submit the job to Cluster.</dd></dl>

</dd></dl>

<dl class="class">
<dt id="clusters.SysOp">
<!--[clusters.SysOp]-->class <tt class="descname">SysOp</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#clusters.SysOp" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref docutils literal"><span class="pre">object</span></tt></p>
<p>The base class for the OS Deemons&#8217; interfaces.</p>
<p>The follow methods are the minimal requerided to communicate the system
with the Interop Router.</p>
<p>The Cluster Class Constructor.</p>
<blockquote>
<p>It receives a dict which contains the Deemon configs for
the operating system.</p>
<p>This items are necessary for any cluster type.</p>
</blockquote>
<dl class="method">
<dt id="clusters.SysOp.RunCommand">
<!--[clusters.SysOp.RunCommand]--><tt class="descname">RunCommand</tt><big>(</big><em>comando</em><big>)</big><a class="headerlink" href="#clusters.SysOp.RunCommand" title="Permalink to this definition">¶</a></dt>
<dd><p>Function used for run commands inside the Deemon.</p>
<p>With this function, the Deemon&#8217;s enviroments variables can be preserved.
The derived classes implement this function according to 
the Operating System command line.</p>
<p>Keyword arguments:</p>
<p>comando &#8211; The command call in the shell.</p>
<p>Returns a string that contain the command output.</p>
</dd></dl>

<dl class="method">
<dt id="clusters.SysOp.compileProject">
<!--[clusters.SysOp.compileProject]--><tt class="descname">compileProject</tt><big>(</big><em>project</em><big>)</big><a class="headerlink" href="#clusters.SysOp.compileProject" title="Permalink to this definition">¶</a></dt>
<dd><p>Method that compile the project source code.</p>
<p>Keyword arguments:</p>
<p>project &#8211; a string with the Project ID</p>
<p>Must be override by the derived class.</p>
</dd></dl>

<dl class="method">
<dt id="clusters.SysOp.jobIsComplete">
<!--[clusters.SysOp.jobIsComplete]--><tt class="descname">jobIsComplete</tt><big>(</big><big>)</big><a class="headerlink" href="#clusters.SysOp.jobIsComplete" title="Permalink to this definition">¶</a></dt>
<dd><p>Verify de end of the job.</p>
<p>True if the job has been finished, False if not.</p>
<p>Must be reimplemented in the derived class.</p>
</dd></dl>

<dl class="method">
<dt id="clusters.SysOp.sumbitJob">
<!--[clusters.SysOp.sumbitJob]--><tt class="descname">sumbitJob</tt><big>(</big><em>project</em>, <em>job</em><big>)</big><a class="headerlink" href="#clusters.SysOp.sumbitJob" title="Permalink to this definition">¶</a></dt>
<dd><p>Method taht submit the job to the Cluster and save the job ID.</p>
<p>Keyword arguments:</p>
<p>project &#8211; a string with the Project ID</p>
<p>job &#8211; a string with the Job ID in the DB</p>
<p>Return an int with the job ID in the cluster.</p>
<p>Must be reimplemented in the derived class.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="clusters.Win2003">
<!--[clusters.Win2003]-->class <tt class="descname">Win2003</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#clusters.Win2003" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a title="clusters.Windows" class="reference internal" href="#clusters.Windows"><tt class="xref docutils literal"><span class="pre">clusters.Windows</span></tt></a></p>
<p>Implements Windows Server 2003 Cluster especific methods.</p>
<p>Extends the SysOp.__init__ method, adding one more config parameter.</p>
<blockquote>
In Windows it is necessary a password to submit jobs.</blockquote>
<dl class="method">
<dt id="clusters.Win2003.compileProject">
<!--[clusters.Win2003.compileProject]--><tt class="descname">compileProject</tt><big>(</big><em>project</em><big>)</big><a class="headerlink" href="#clusters.Win2003.compileProject" title="Permalink to this definition">¶</a></dt>
<dd><p>Method for compile the project&#8217;s source code in Windows 2003.</p>
<p>Uses the auxiliar file <em>ambient.vs8.wccs.x86.bat</em> to set the especific
enviroment variables used to complile the sorce code.</p>
<p>If a compilation error occours, a ErroCompilacao Exception is raised</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="clusters.Win2008">
<!--[clusters.Win2008]-->class <tt class="descname">Win2008</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#clusters.Win2008" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a title="clusters.Windows" class="reference internal" href="#clusters.Windows"><tt class="xref docutils literal"><span class="pre">clusters.Windows</span></tt></a></p>
<p>Implements Windows Server 2008 Cluster especific methods.</p>
<p>Extends the SysOp.__init__ method, adding one more config parameter.</p>
<blockquote>
In Windows it is necessary a password to submit jobs.</blockquote>
<dl class="method">
<dt id="clusters.Win2008.compileProject">
<!--[clusters.Win2008.compileProject]--><tt class="descname">compileProject</tt><big>(</big><em>project</em><big>)</big><a class="headerlink" href="#clusters.Win2008.compileProject" title="Permalink to this definition">¶</a></dt>
<dd><p>Method for compile the project&#8217;s source code in Windows 2008.</p>
<p>Uses the auxiliar file <em>ambient.vs9.whpc.bat</em> to set the especific
enviroment variables used to complile the sorce code.</p>
<p>If a compilation error occours, a ErroCompilacao Exception is raised</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="clusters.Windows">
<!--[clusters.Windows]-->class <tt class="descname">Windows</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#clusters.Windows" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a title="clusters.SysOp" class="reference internal" href="#clusters.SysOp"><tt class="xref docutils literal"><span class="pre">clusters.SysOp</span></tt></a></p>
<p>Implements the interface class with Windows systems.</p>
<p>Extends the SysOp.__init__ method, adding one more config parameter.</p>
<blockquote>
In Windows it is necessary a password to submit jobs.</blockquote>
<dl class="method">
<dt id="clusters.Windows.jobIsComplete">
<!--[clusters.Windows.jobIsComplete]--><tt class="descname">jobIsComplete</tt><big>(</big><em>job</em><big>)</big><a class="headerlink" href="#clusters.Windows.jobIsComplete" title="Permalink to this definition">¶</a></dt>
<dd><p>Windows implementation of method that verify if the job has finished.</p>
<p>Overrides the SysOp method and return True or False
if the job is ended or not.</p>
<p>If the Job is cancelled or fail, throws the ErroJob Exception.</p>
</dd></dl>

<dl class="method">
<dt id="clusters.Windows.sumbitJob">
<!--[clusters.Windows.sumbitJob]--><tt class="descname">sumbitJob</tt><big>(</big><em>project</em>, <em>job</em><big>)</big><a class="headerlink" href="#clusters.Windows.sumbitJob" title="Permalink to this definition">¶</a></dt>
<dd><p>Windows version of method for submit the job to Cluster.</p>
<p>Override the SysOp method and return a int with the job id in
the cluster system.</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="deemon.html" title="previous chapter"><tt class="docutils literal"><span class="pre">deemon</span></tt> &#8212; Daemon Main</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="connectSQL.html" title="next chapter"><tt class="docutils literal"><span class="pre">connectSQL</span></tt> &#8212; SQL Connection Handler</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../../_sources/deemon/modules/clusters.txt">Show Source</a></li>
            </ul>
          <h3>Quick search</h3>
            <form class="search" action="../../search.html" method="get">
              <input type="text" name="q" size="18" /> <input type="submit" value="Go" />
              <input type="hidden" name="check_keywords" value="yes" />
              <input type="hidden" name="area" value="default" />
            </form>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="connectSQL.html" title="connectSQL &#8212; SQL Connection Handler"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="deemon.html" title="deemon &#8212; Daemon Main"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">Interop Router 3.30 documentation</a> &raquo;</li>
          <li><a href="../index.html" accesskey="U">Deemon Documentation</a> &raquo;</li>
          <li><a href="mod_index.html" accesskey="U">Python Modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright .
      Last updated on Dec 17, 2008.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
    </div>
  </body>
</html>